package 补充.输入输出操作.文件操作;

import java.io.CharArrayReader;
import java.io.CharArrayWriter;
import java.io.IOException;

public class 字符内存操作流 {

    public static void main(String[] args) throws IOException {
        CharArrayWriter caw = new CharArrayWriter();
        caw.write("a");
        caw.write("b");
        caw.write("c");
        System.out.println(caw);
        caw.close();
        char[] chars = caw.toCharArray();
        System.out.println("*********************************");
        CharArrayReader car = new CharArrayReader(chars);
        for(int i =0;i<chars.length;i++){
            System.out.print(chars[i]);
        }
    }
}
